package model;

import java.util.ArrayList;

import javax.swing.DefaultListModel;

@SuppressWarnings("serial")
public class ElementList extends DefaultListModel
{
	private ArrayList<String> nameList;
	
	public ElementList()
	{
		this.nameList=new ArrayList<String>();
	}
	
	public void addElement(String nom)
	{
		this.nameList.add(nom);
	}
	
	public String getName(int index)
	{
		return this.nameList.get(index);
	}
	
	public String toString()
	{
		return this.getName(0);
	}
}